Skip to content

fix: explain rejected review commands without retry or comment spam - #21

Merged
AppSolves merged 1 commit into
mainfrom
fix/review-admission-feedback
Nov 15, 2026
Merged

AppSolves merged 1 commit into
mainfrom
fix/review-admission-feedback

Conversation

@AppSolves

Copy link
Copy Markdown
Owner

Authorized review commands that hit a policy limit currently disappear: all admission denials become HTTP 429, webhook recovery retries them, and no public explanation is recorded. This change persists the exact admission outcome and safely publishes an App-owned PR issue comment without dispatching inference.

  • Preserve all atomic quota predicates; classify explicit rerun, per-user/repository/installation quota, active concurrency, cooldown and unchanged-context duplication in the same D1 transaction. Calculate UTC retry bounds from persisted sliding-window timestamps, including lowered limits and exact expiry boundaries.
  • Add migration 0005_review_admission_feedback.sql for a tenant-scoped feedback outbox. Original command IDs and leases deduplicate parallel workers, webhook redelivery and cron. Accepted-command redeliveries reuse the existing request rather than spend another rerun or claim a false denial.
  • Only verified fresh configured manual commands from currently authorized users receive fixed human-readable feedback. Invalid/disallowed commands use the same outbox. Unrelated, quoted, spoofed, unauthorized and automatic events cannot generate feedback spam. Actor IDs are checked against live GitHub permissions.
  • Deterministic rejections complete the delivery. Feedback independently retries transient failures with bounded backoff. Ambiguous comment POST responses are reconciled using the exact marker, App ID, bot identity and PR identity; a POST is never blindly repeated. GitHub has no exactly-once comment API, so an unresolved pre-POST crash or deleted/unfindable comment fails for operator attention after bounded reconciliation instead of risking duplicates.
  • Existing review/progress publishing, OIDC, credential boundaries, protected Environments, inference gates and merge policy remain intact. Both feedback and progress recovery receive a bounded scheduled turn.

Validation: full check/typecheck/lint/build, direct quota/time/concurrency/failure regression tests, clean-checkout npm ci/check, actual workerd/D1 atomic admission and migrations, Chromium onboarding, catalog verification, Actionlint, npm audit, Docker/native Codex synthetic-provider sandbox, High/Critical image scan and Worker dry-run. The D1 test caught the runtime compound-SELECT limit; the final query uses VALUES and passes workerd.

Production rollout, explicitly authorized by the operator: wait for required CI/protections; squash merge; derive the actual merge SHA with the existing pin-upgrade script; review/merge Worker-test and caller pin PRs; apply pending migration 0005; deploy the reviewed Worker with browser OAuth, hosted web inference and automatic merging still disabled. Verify the deployed version and pins, health, a fresh exhausted-rerun command, terminal outbox/delivery state and no new inference workflow. Ordinary live inference smoke is excluded at the operator's request. No credentials, quota counters, active sessions, App permissions or branch protections are changed.

@AppSolves
AppSolves merged commit badae82 into main Nov 15, 2026
4 checks passed
@AppSolves
AppSolves deleted the fix/review-admission-feedback branch November 15, 2026 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant